﻿using Microsoft.Xna.Framework.Graphics;

namespace GameStateManagement.View.Rendering
{
    class BasicRenderer : Renderer
    {
        #region Fields



        #endregion

        #region Public Methods

        public BasicRenderer(RenderManager manager)
            : base(manager)
        { }

        public override void Render(IRenderable renderable)
        {
            Render(renderable, renderable.TextureName);
        }

        public override void Render(IRenderable renderable, string textureName)
        {
            Texture2D texture = Manager.SpriteManager.GetSprite(textureName);

            Manager.SpriteBatch.Draw(texture, renderable.Position, null, renderable.Color, renderable.Rotation, GetOrigin(texture),
                                      renderable.Scale, SpriteEffects.None, 0);
        }

        #endregion

    }
}
